local xiongzhi = fk.CreateSkill{
    name = "ym2__xiongzhi",
    tags = {Skill.Compulsory},
}
Fk:loadTranslationTable{
    ["ym2__xiongzhi"] = "雄志",
    [":ym2__xiongzhi"] = "锁定技，游戏开始时，你明置身份牌；与你同阵营的角色均死亡前，你不会离场。",
}
xiongzhi:addEffect(fk.GameStart,{
    can_trigger = function (self, event, target, player, data)
        return player:hasSkill(xiongzhi.name)
    end,
    on_cost = Util.TrueFunc,
    on_use = function (self, event, target, player, data)
        player.room:setPlayerProperty(player, "role_shown", true)
    end,
})
xiongzhi:addEffect(fk.HpChanged,{
    anim_type = "defensive",
    can_trigger = function (self, event, target, player, data)
        return player == target and player:hasSkill(xiongzhi.name) and #player:getFriends(false,false) > 0 and player.hp < 1
    end,
    on_cost = Util.TrueFunc,
    on_use = function (self, event, target, player, data)
        local room = player.room
        data.preventDying = true
    end,
})
xiongzhi:addEffect(fk.BeforeGameOverJudge,{
    anim_type = "defensive",
    can_trigger = function (self, event, target, player, data)
        return player == target and player:hasSkill(xiongzhi.name,false,true) and #player:getFriends(false,false) > 0
    end,
    on_cost = Util.TrueFunc,
    on_use = function (self, event, target, player, data)
        local room = player.room
        room:setPlayerProperty(player, "dead", false)
        player._splayer:setDied(false)
        room:setPlayerProperty(player, "dying", false)
        table.insertIfNeed(room.alive_players, player)
        room.logic:getCurrentEvent().parent:shutdown()
    end,
})
return xiongzhi